package com.linn.home.service.impl;

import com.linn.home.dao.NoticeDao;
import com.linn.home.dao.RoleMenuDao;
import com.linn.home.entity.RoleMenu;
import com.linn.home.service.RoleMenuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2018/8/9.
 */
@Service("roleMenuService")
public class RoleMenuServiceImpl implements RoleMenuService {

    @Resource
    private RoleMenuDao roleMenuDao;

    @Override
    public int deleteRoleMenuByRoleId(int roleId) {
        RoleMenu roleMenu = new RoleMenu();
        roleMenu.setRoleId(roleId);
        return roleMenuDao.deleteRoleMenuByRoleId(roleMenu);
    }

    @Override
    public int addRoleMenu(RoleMenu roleMenu) {
        return roleMenuDao.addRoleMenu(roleMenu);
    }
}
